/**
 * Copyright 2018 人人开源 http://www.renren.io
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.hs.srm.base.modules.sys.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 部门管理
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-06-20 15:23:47
 */
@Setter
@Getter
@TableName("sys_dept")
public class SysDeptEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	// 部门ID
	@TableId(type = IdType.AUTO)
	private Long deptId;
	// 上级部门ID，一级部门为0
	private Long parentId;
	// 部门名称
	private String name;
	// 上级部门名称
	@TableField(exist = false)
	private String parentName;
	// 排序
	private Double orderNum;

	@TableLogic
	private Integer delFlag;
	/**
	 * ztree属性
	 */
	@TableField(exist = false)
	private Boolean open = true;
	@TableField(exist = false)
	private List<?> list;

	/**
	 * 门店形象图片id
	 */
	private Integer imageId;

	/**
	 * 门店类型编码
	 */
	private String typeCode;

	/**
	 * 门店类型名称
	 */
	@TableField(exist = false)
	private String typeName;

	private String mobile;

	private String slogan;

	private String provinceCode;

	private String cityCode;

	private String areaCode;

	private String address;

	private Double longitude;
	private Double latitude;

	/**
	 * 成立时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date foundingTime;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * 主营业务ID列表
	 */
	@TableField(exist = false)
	private List<Long> mainBizIds;

	/**
	 * 门店短信剩余数
	 */
	private Long smsSurplusNum;

}
